package com.server.modules.sys.scheduled;

import com.server.modules.sys.service.schedule.ScheduleService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 日程提醒任务  //每半个小时检查一遍有没有提醒
 */
@Component
public class ScheduleRemindTask {
    @Resource
    private ScheduleService scheduleService;
    @Scheduled(cron = "0 0/30 * * * ?") //每半个小时执行
    public void taskCycle(){
        scheduleService.remindInTimeSchedules();
    }
}
